﻿
namespace bookMaster.AssetSystem.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.Usuarios"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class UsuariosEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the IdUsuario property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIdUsuario;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IdUsuario property.
		/// </summary>
		protected System.Windows.Forms.Label uxIdUsuarioLabel;
		
		/// <summary>
		/// TextBox for the NombreUsuario property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxNombreUsuario;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the NombreUsuario property.
		/// </summary>
		protected System.Windows.Forms.Label uxNombreUsuarioLabel;
		
		/// <summary>
		/// TextBox for the UsuarioWindows property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxUsuarioWindows;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the UsuarioWindows property.
		/// </summary>
		protected System.Windows.Forms.Label uxUsuarioWindowsLabel;
		
		/// <summary>
		/// TextBox for the Fingerprint property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxFingerprint;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Fingerprint property.
		/// </summary>
		protected System.Windows.Forms.Label uxFingerprintLabel;
		
		/// <summary>
		/// TextBox for the Supervisor property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxSupervisor;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Supervisor property.
		/// </summary>
		protected System.Windows.Forms.Label uxSupervisorLabel;
		
		/// <summary>
		/// TextBox for the ClaveSupervisor property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxClaveSupervisor;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ClaveSupervisor property.
		/// </summary>
		protected System.Windows.Forms.Label uxClaveSupervisorLabel;
		
		/// <summary>
		/// TextBox for the Habilitar property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxHabilitar;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Habilitar property.
		/// </summary>
		protected System.Windows.Forms.Label uxHabilitarLabel;
		#endregion
		
		#region Main entity
		private Entities.Usuarios _Usuarios;
		/// <summary>
		/// Gets or sets the <see cref="Entities.Usuarios"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.Usuarios"/> instance.</value>
		public Entities.Usuarios Usuarios
		{
			get {return this._Usuarios;}
			set
			{
				this._Usuarios = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxIdUsuario.DataBindings.Clear();
			this.uxIdUsuario.DataBindings.Add("Text", this.uxBindingSource, "IdUsuario", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxNombreUsuario.DataBindings.Clear();
			this.uxNombreUsuario.DataBindings.Add("Text", this.uxBindingSource, "NombreUsuario", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxUsuarioWindows.DataBindings.Clear();
			this.uxUsuarioWindows.DataBindings.Add("Text", this.uxBindingSource, "UsuarioWindows", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxFingerprint.DataBindings.Clear();
			this.uxFingerprint.DataBindings.Add("Text", this.uxBindingSource, "Fingerprint", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxSupervisor.DataBindings.Clear();
			this.uxSupervisor.DataBindings.Add("Text", this.uxBindingSource, "Supervisor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxClaveSupervisor.DataBindings.Clear();
			this.uxClaveSupervisor.DataBindings.Add("Text", this.uxBindingSource, "ClaveSupervisor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxHabilitar.DataBindings.Clear();
			this.uxHabilitar.DataBindings.Add("Text", this.uxBindingSource, "Habilitar", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="UsuariosEditControlBase"/> class.
		/// </summary>
		public UsuariosEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_Usuarios != null) _Usuarios.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxIdUsuario = new System.Windows.Forms.TextBox();
			uxIdUsuarioLabel = new System.Windows.Forms.Label();
			this.uxNombreUsuario = new System.Windows.Forms.TextBox();
			uxNombreUsuarioLabel = new System.Windows.Forms.Label();
			this.uxUsuarioWindows = new System.Windows.Forms.TextBox();
			uxUsuarioWindowsLabel = new System.Windows.Forms.Label();
			this.uxFingerprint = new System.Windows.Forms.TextBox();
			uxFingerprintLabel = new System.Windows.Forms.Label();
			this.uxSupervisor = new System.Windows.Forms.TextBox();
			uxSupervisorLabel = new System.Windows.Forms.Label();
			this.uxClaveSupervisor = new System.Windows.Forms.TextBox();
			uxClaveSupervisorLabel = new System.Windows.Forms.Label();
			this.uxHabilitar = new System.Windows.Forms.TextBox();
			uxHabilitarLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIdUsuarioLabel
			//
			this.uxIdUsuarioLabel.Name = "uxIdUsuarioLabel";
			this.uxIdUsuarioLabel.Text = "Id Usuario:";
			this.uxIdUsuarioLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIdUsuarioLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdUsuarioLabel);			
			//
			// uxIdUsuario
			//
			this.uxIdUsuario.Name = "uxIdUsuario";
			this.uxIdUsuario.Width = 250;
			this.uxIdUsuario.MaxLength = 30;
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdUsuario);
			this.uxIdUsuario.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxIdUsuario);
			//
			// uxNombreUsuarioLabel
			//
			this.uxNombreUsuarioLabel.Name = "uxNombreUsuarioLabel";
			this.uxNombreUsuarioLabel.Text = "Nombre Usuario:";
			this.uxNombreUsuarioLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxNombreUsuarioLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxNombreUsuarioLabel);			
			//
			// uxNombreUsuario
			//
			this.uxNombreUsuario.Name = "uxNombreUsuario";
			this.uxNombreUsuario.Width = 250;
			this.uxNombreUsuario.MaxLength = 50;
			//this.uxTableLayoutPanel.Controls.Add(this.uxNombreUsuario);
			this.uxNombreUsuario.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxNombreUsuario);
			//
			// uxUsuarioWindowsLabel
			//
			this.uxUsuarioWindowsLabel.Name = "uxUsuarioWindowsLabel";
			this.uxUsuarioWindowsLabel.Text = "Usuario Windows:";
			this.uxUsuarioWindowsLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxUsuarioWindowsLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxUsuarioWindowsLabel);			
			//
			// uxUsuarioWindows
			//
			this.uxUsuarioWindows.Name = "uxUsuarioWindows";
			//this.uxTableLayoutPanel.Controls.Add(this.uxUsuarioWindows);
			this.uxUsuarioWindows.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxUsuarioWindows);
			//
			// uxFingerprintLabel
			//
			this.uxFingerprintLabel.Name = "uxFingerprintLabel";
			this.uxFingerprintLabel.Text = "Fingerprint:";
			this.uxFingerprintLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxFingerprintLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxFingerprintLabel);			
			//
			// uxFingerprint
			//
			this.uxFingerprint.Name = "uxFingerprint";
			this.uxFingerprint.Width = 250;
			this.uxFingerprint.MaxLength = 200;
			//this.uxTableLayoutPanel.Controls.Add(this.uxFingerprint);
			this.uxFingerprint.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxFingerprint);
			//
			// uxSupervisorLabel
			//
			this.uxSupervisorLabel.Name = "uxSupervisorLabel";
			this.uxSupervisorLabel.Text = "Supervisor:";
			this.uxSupervisorLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxSupervisorLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxSupervisorLabel);			
			//
			// uxSupervisor
			//
			this.uxSupervisor.Name = "uxSupervisor";
			//this.uxTableLayoutPanel.Controls.Add(this.uxSupervisor);
			this.uxSupervisor.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxSupervisor);
			//
			// uxClaveSupervisorLabel
			//
			this.uxClaveSupervisorLabel.Name = "uxClaveSupervisorLabel";
			this.uxClaveSupervisorLabel.Text = "Clave Supervisor:";
			this.uxClaveSupervisorLabel.Location = new System.Drawing.Point(3, 130);
			this.Controls.Add(this.uxClaveSupervisorLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxClaveSupervisorLabel);			
			//
			// uxClaveSupervisor
			//
			this.uxClaveSupervisor.Name = "uxClaveSupervisor";
			this.uxClaveSupervisor.Width = 250;
			this.uxClaveSupervisor.MaxLength = 10;
			//this.uxTableLayoutPanel.Controls.Add(this.uxClaveSupervisor);
			this.uxClaveSupervisor.Location = new System.Drawing.Point(160, 130);
			this.Controls.Add(this.uxClaveSupervisor);
			//
			// uxHabilitarLabel
			//
			this.uxHabilitarLabel.Name = "uxHabilitarLabel";
			this.uxHabilitarLabel.Text = "Habilitar:";
			this.uxHabilitarLabel.Location = new System.Drawing.Point(3, 156);
			this.Controls.Add(this.uxHabilitarLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxHabilitarLabel);			
			//
			// uxHabilitar
			//
			this.uxHabilitar.Name = "uxHabilitar";
			//this.uxTableLayoutPanel.Controls.Add(this.uxHabilitar);
			this.uxHabilitar.Location = new System.Drawing.Point(160, 156);
			this.Controls.Add(this.uxHabilitar);
			// 
			// UsuariosEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "UsuariosEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
		
		#endregion
		
        #region Field visibility

        /// <summary>
        /// Indicates if the controls associated with the uxIdUsuario property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxIdUsuarioVisible
        {
            get { return this.uxIdUsuario.Visible; }
            set
            {
                this.uxIdUsuarioLabel.Visible = value;
                this.uxIdUsuario.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxIdUsuario property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxIdUsuarioEnabled
        {
            get { return this.uxIdUsuario.Enabled; }
            set
            {
                this.uxIdUsuario.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxNombreUsuario property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxNombreUsuarioVisible
        {
            get { return this.uxNombreUsuario.Visible; }
            set
            {
                this.uxNombreUsuarioLabel.Visible = value;
                this.uxNombreUsuario.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxNombreUsuario property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxNombreUsuarioEnabled
        {
            get { return this.uxNombreUsuario.Enabled; }
            set
            {
                this.uxNombreUsuario.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxUsuarioWindows property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxUsuarioWindowsVisible
        {
            get { return this.uxUsuarioWindows.Visible; }
            set
            {
                this.uxUsuarioWindowsLabel.Visible = value;
                this.uxUsuarioWindows.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxUsuarioWindows property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxUsuarioWindowsEnabled
        {
            get { return this.uxUsuarioWindows.Enabled; }
            set
            {
                this.uxUsuarioWindows.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxFingerprint property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxFingerprintVisible
        {
            get { return this.uxFingerprint.Visible; }
            set
            {
                this.uxFingerprintLabel.Visible = value;
                this.uxFingerprint.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxFingerprint property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxFingerprintEnabled
        {
            get { return this.uxFingerprint.Enabled; }
            set
            {
                this.uxFingerprint.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxSupervisor property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxSupervisorVisible
        {
            get { return this.uxSupervisor.Visible; }
            set
            {
                this.uxSupervisorLabel.Visible = value;
                this.uxSupervisor.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxSupervisor property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxSupervisorEnabled
        {
            get { return this.uxSupervisor.Enabled; }
            set
            {
                this.uxSupervisor.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxClaveSupervisor property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxClaveSupervisorVisible
        {
            get { return this.uxClaveSupervisor.Visible; }
            set
            {
                this.uxClaveSupervisorLabel.Visible = value;
                this.uxClaveSupervisor.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxClaveSupervisor property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxClaveSupervisorEnabled
        {
            get { return this.uxClaveSupervisor.Enabled; }
            set
            {
                this.uxClaveSupervisor.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxHabilitar property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxHabilitarVisible
        {
            get { return this.uxHabilitar.Visible; }
            set
            {
                this.uxHabilitarLabel.Visible = value;
                this.uxHabilitar.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxHabilitar property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxHabilitarEnabled
        {
            get { return this.uxHabilitar.Enabled; }
            set
            {
                this.uxHabilitar.Enabled = value;
            }
        }

        #endregion

		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
